<?php

namespace Chaosyeo\SolarEngine\Event;

class RegistrationProperties extends Properties
{
    protected $regType;  // 注册类型
    protected $status;   // 注册状态

    /**
     * @param string $regType 注册类型（必传）
     * @param string $status 注册状态（可选）
     */
    public function __construct(int $platform, string $regType, array $params = [], array $customProperties = [])
    {
        if (empty($regType)) {
            throw new \InvalidArgumentException('Registration type is required');
        }

        if (strlen($regType) > 32) {
            throw new \InvalidArgumentException('Registration type cannot exceed 32 characters');
        }

        $this->regType = $regType;

        parent::__construct($platform, $params, $customProperties);
    }
}